package com.itheima.restkeeper.face;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.restkeeper.UserFace;
import com.itheima.restkeeper.req.UserVo;
import com.itheima.restkeeper.service.IUserAdapterService;
import com.itheima.restkeeper.service.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Method;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @ClassName UserFaceImpl.java
 * @Description TODO
 */
@Slf4j
@DubboService(version = "${dubbo.application.version}",timeout = 5000,
        methods ={
                @Method(name = "findUserVoPage",retries = 2),
                @Method(name = "createUser",retries = 0),
                @Method(name = "updateUser",retries = 0),
                @Method(name = "deleteUser",retries = 0)
        })
public class UserFaceImpl implements UserFace {

    @Autowired
    IUserService userService;

    @Autowired
    IUserAdapterService userAdapterService;

    @Override
    public Page<UserVo> findUserVoPage(UserVo userVo, int pageNum, int pageSize) {
        //查询Page<User>用户分页
        //转化Page<User>为Page<UserVo>
        //转换List<User>为 List<UserVo>
        //查询角色信息
        //返回结果
        return null;
    }

    @Override
    public UserVo createUser(UserVo userVo) {
        return null;
    }

    @Override
    public Boolean updateUser(UserVo userVo) {
        return null;
    }

    @Override
    public Boolean deleteUser(String[] checkedIds) {
        return null;
    }

    @Override
    public UserVo findUserByUserId(Long userId) {
        return null;
    }

    @Override
    public List<UserVo> findUserVoList() {
        return null;
    }

}
